Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MERGE][IMP] (website)_sale_(product_configurator): improve p. configurator & exclusions #28310

Closed

Conversation

awa-odoo
Copy link
Contributor

@awa-odoo awa-odoo commented Oct 31, 2018

Task #1891970
Original p. configurator commit d3530eb

Main purpose

The main purpose of this merge is to improve the product configurator usability by removing the "Configure a product" link to make it dynamic based on the selected product.
It also cleans the (website_)sale modules by moving the configurator specific code into its own modules: (website)_sale_product_configurator.

Detailed changes

Here is a more detailed list of the things done in this merge:

  • Moved the product_configurator into its own module now that we have a specific option for it.
    The option only enables the p. configurator in the SO form.
    The e-commerce should always allow customer to configure their products, even if the option is not
    checked.

    This allows moving some of the code specific to the p. configurator into its own module.
    However, a lot of the code has to remain in "sale" module since the e-commerce does not require the
    option checked and needs the "configure product" feature in the shop by default.

    (This is why the fields "product_custom_attribute_value_ids" and
    "product_no_variant_attribute_value_ids" are still in the "sale" module)

  • Since we now have the product_configurator in its own module, we can add a bridge module for the
    website_sale to override the necessary controller routes in a cleaner way.
    This commit adds the bridge module and move files and code around.

  • The sale order lines will now always be editable directly from the tree view.
    Installing some modules would force a popup form, which leads to a significant drop
    in productivity when filling in multiple sale order lines.

  • This commit will add an event configurator widget that will open a wizard when the selected product is
    'event_ok'.
    The widget will allow configuring the 'event_id' and the 'event_ticket_id' fields so that they can be safely
    removed from the sale order line tree view.
    The user can also edit the event configuration by using a button next to the product_id dropdown field
    if the product is configured as 'event_ok'.

  • The p. configurator now comes with a widget that is "o2m" like in the SO lines view.
    The widget is only used on the added "product_template_id" field on the SO line.

    This widget controls the opening of the configuration window and removes the need of a "Configure a
    product" button.
    The "SectionAndNoteListRenderer" is now cleaned from p. configurator specific code.

    The widget is also responsible for handling the configuration provided by the p. configurator form
    and applying it on the SO line with a 'field_changed' event that updates all the necessary fields.

  • Added support for 'MULTI' and 'DELETE_ALL' operations on X2Many fields in basic_model.js

    • 'MULTI' allows to batch multiple operations at once
    • 'DELETE_ALL' behaves like 'DELETE' with all the current data of the field
  • A message will be displayed when hovering a disabled attribute value's input to explain why it's
    disabled.
    e.g: Not available with Color: Black

    This works for both exclusions within the product and exclusions from a reference product.

  • The exclusions will work in both sides, if "black" excludes "metal", "metal" will also exclude "black".

  • The "Customizable Desk" and "Conference chair" products now have some stock in the initial inventory
    to avoid the stock warning when adding these products in a SO through the product configurator.

  • The _name_search of product.template fallbacks by default on product.product
    In case there are no product.products yet (dynamic product variants configuration), we need to
    include the base product.template _name_search in the results

  • The "ProductConfiguratorMixin" was named like that for historical reasons.
    It had no direct link to the product configurator anymore since the latter was moved in its own module.
    The ProductConfiguratorMixin was renamed to VariantMixin to avoid confusion.
    This commit just move files around, there should not be any functional change.

Spec

  • remove "configure a product" from sale order lines
    When the product configurator is active, replace the product_product_id by a product_template_id
    in the sale order line. When we select a template without variants, it sets the variant automatically,
    but when we select a product template having variants, it opens the configurator dialog.
  • add a widget to modify the product configuration in the sale order line (next to product template field)
  • UX improvements:
    • Invert image and configuration in the main screen
    • If the product doesn't have an image, hide it instead of showing the placeholder (only for first
      screen?)
  • new independent option in sales settings to activate product configurator.
    (same in e-commerce)
  • demo data: Change demo data to set Customizable Desk & Conference Chair as make to order
  • If only one attribute value that is Custom, don't display radio, selection or even color box
  • show exclusions in both sides in the configurator
    -> SOLUTION: auto populate other way around (Black not for XL -> XL not for Black)
  • don't allow to select an excluded value in the configurator (frustrating).
    Replace with an uncomaptibility message on hover (e.g. Not available for Color: Black, Size: XL)
  • apply the same mechanism for optional & suggested products: e.g. Not available for Customizable
    Table (Color: Black)
    --
    I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Oct 31, 2018
@awa-odoo awa-odoo force-pushed the master-product-configurator-v13-awa branch from ab06571 to 931c1fc Compare October 31, 2018 14:52
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Oct 31, 2018
@C3POdoo C3POdoo added the RD research & development, internal work label Nov 2, 2018
@awa-odoo awa-odoo force-pushed the master-product-configurator-v13-awa branch from 931c1fc to eee5bbd Compare November 2, 2018 10:46
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Nov 2, 2018
@awa-odoo awa-odoo force-pushed the master-product-configurator-v13-awa branch from eee5bbd to 2803093 Compare November 2, 2018 13:18
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Nov 2, 2018
@awa-odoo awa-odoo force-pushed the master-product-configurator-v13-awa branch from 2803093 to 8843cc5 Compare November 2, 2018 15:12
@robodoo robodoo removed the CI 🤖 Robodoo has seen passing statuses label Nov 2, 2018
@awa-odoo awa-odoo force-pushed the master-product-configurator-v13-awa branch from 8843cc5 to cc0d6da Compare November 5, 2018 07:48
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Nov 5, 2018
@awa-odoo awa-odoo force-pushed the master-product-configurator-v13-awa branch from cc0d6da to 56ad7f0 Compare November 5, 2018 10:02
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Nov 5, 2018
@awa-odoo awa-odoo force-pushed the master-product-configurator-v13-awa branch from 56ad7f0 to a7f3241 Compare November 14, 2018 09:20
@robodoo robodoo removed the CI 🤖 Robodoo has seen passing statuses label Nov 14, 2018
@awa-odoo awa-odoo force-pushed the master-product-configurator-v13-awa branch 5 times, most recently from 961ac90 to 26ec237 Compare November 16, 2018 09:16
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Nov 16, 2018
@awa-odoo awa-odoo force-pushed the master-product-configurator-v13-awa branch from 26ec237 to 9ffddfa Compare November 20, 2018 13:30
@robodoo robodoo removed the CI 🤖 Robodoo has seen passing statuses label Nov 20, 2018
@awa-odoo awa-odoo force-pushed the master-product-configurator-v13-awa branch 2 times, most recently from d6b32ee to 5084ef7 Compare November 20, 2018 15:09
Purpose
=======
- Moved the product_configurator into its own module now that we have a specific option for it.
  The option only enables the p. configurator in the SO form.
  The e-commerce should always allow customer to configure their products, even if the option is not checked.

  This allows moving some of the code specific to the p. configurator into its own module.
  However, a lot of the code has to remain in "sale" module since the e-commerce does not require the option
  checked and needs the "configure product" feature in the shop by default.
  (This is why the fields "product_custom_attribute_value_ids" and "product_no_variant_attribute_value_ids"
  are still in the "sale" module)
Purpose
=======
Since we now have the product_configurator in its own module, we can add a bridge module for the website_sale
to override the necessary controller routes in a cleaner way.

This commit just adds the bridge module and move files and code around, there should not be any functional change.
@awa-odoo awa-odoo force-pushed the master-product-configurator-v13-awa branch from 098fb1b to 5f98ea0 Compare March 27, 2019 15:13
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Mar 27, 2019
@awa-odoo awa-odoo force-pushed the master-product-configurator-v13-awa branch from 5f98ea0 to 0dc3e40 Compare March 28, 2019 07:56
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Mar 28, 2019
@awa-odoo awa-odoo force-pushed the master-product-configurator-v13-awa branch from 0dc3e40 to bcfb7f0 Compare March 28, 2019 12:56
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Mar 28, 2019
@awa-odoo awa-odoo force-pushed the master-product-configurator-v13-awa branch from bcfb7f0 to fae302d Compare March 28, 2019 14:41
@robodoo robodoo removed the CI 🤖 Robodoo has seen passing statuses label Mar 28, 2019
Task #1891970
Original p. configurator commit d3530eb

Purpose
=======
- The p. configurator now comes with a widget that is "o2m" like in the SO lines view.
  The widget is only used on the added "product_template_id" field on the SO line.

  This widget controls the opening of the configuration window and removes the need of a "Configure a product" button.
  The "SectionAndNoteListRenderer" is now cleaned from p. configurator specific code.

  The widget is also responsible for handling the configuration provided by the p. configurator form
  and applying it on the SO line with a 'field_changed' event that updates all the necessary fields.

- Added support for 'MULTI' and 'DELETE_ALL' operations on X2Many fields in basic_model.js
  - 'MULTI' allows to batch multiple operations at once
  - 'DELETE_ALL' behaves like 'DELETE' with all the current data of the field

Spec
=======
- remove "configure a product" from sale order lines
  When the product configurator is active, replace the product_product_id by a product_template_id
  in the sale order line. When we select a template without variants, it sets the variant automatically,
  but when we select a product template having variants, it opens the configurator dialog.
- add a widget to modify the product configuration in the sale order line (next to product template field)
- UX improvements:
    - Invert image and configuration in the main screen
    - If the product doesn't have an image, hide it instead of showing the placeholder (only for first screen?)
- new independent option in sales settings to activate product configurator.
  (same in e-commerce)
- demo data: Change demo data to set Customizable Desk & Conference Chair as make to order
- If only one attribute value that is Custom, don't display radio, selection or even color box
…ant_mixin

Task #1891970

Purpose
=======

The "ProductConfiguratorMixin" was named like that for historical reasons.
It had no direct link to the product configurator anymore since the latter was moved in its own module.

The ProductConfiguratorMixin was renamed to VariantMixin to avoid confusion.
This commit just move files around, there should not be any functional change.
…params

Task #1891970

Purpose
=======

This commit cleans up the deprecated methods introduced during the product configurator
post v12 fix (ref: f8dad1b).
Task #1891970

Purpose
=======

The name of the optional products displayed in the modal now change dynamically based on the selected
variants configuration.
You do not have to wait until the product is in the cart to see the full name anymore.

Ex: Conference Chair -> Conference Chair (Steel)
Purpose
=======

When a single custom value is configured in an attribute, use the 'value' label
as a placeholder to have a full width input.
@awa-odoo awa-odoo force-pushed the master-product-configurator-v13-awa branch from fae302d to 70c9a73 Compare March 28, 2019 14:55
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Mar 28, 2019
@tde-banana-odoo
Copy link
Contributor

@robodoo r+ rebase-merge

@robodoo
Copy link
Contributor

robodoo commented Mar 29, 2019

Merge method set to rebase and merge, using the PR as merge commit message

robodoo added a commit that referenced this pull request Mar 29, 2019
…urator & exclusions

Task #1891970
Original p. configurator commit d3530eb

Main purpose
------------------

The main purpose of this merge is to improve the product configurator usability by removing the "Configure a product" link to make it dynamic based on the selected product.
It also cleans the (website_)sale modules by moving the configurator specific code into its own modules: (website)_sale_product_configurator.

Detailed changes
-----------------------

Here is a more detailed list of the things done in this merge:

- Moved the product_configurator into its own module now that we have a specific option for it.
  The option only enables the p. configurator in the SO form.
  The e-commerce should always allow customer to configure their products, even if the option is not
  checked.

  This allows moving some of the code specific to the p. configurator into its own module.
  However, a lot of the code has to remain in "sale" module since the e-commerce does not require the
  option checked and needs the "configure product" feature in the shop by default.

  (This is why the fields "product_custom_attribute_value_ids" and
  "product_no_variant_attribute_value_ids" are still in the "sale" module)

- Since we now have the product_configurator in its own module, we can add a bridge module for the
  website_sale to override the necessary controller routes in a cleaner way.
  This commit adds the bridge module and move files and code around.

- The sale order lines will now always be editable directly from the tree view.
  Installing some modules would force a popup form, which leads to a significant drop
  in productivity when filling in multiple sale order lines.

- This commit will add an event configurator widget that will open a wizard when the selected product is
  'event_ok'.
  The widget will allow configuring the 'event_id' and the 'event_ticket_id' fields so that they can be safely
  removed from the sale order line tree view.
  The user can also edit the event configuration by using a button next to the product_id dropdown field
  if the product is configured as 'event_ok'.

- The p. configurator now comes with a widget that is "o2m" like in the SO lines view.
  The widget is only used on the added "product_template_id" field on the SO line.

  This widget controls the opening of the configuration window and removes the need of a "Configure a
  product" button.
  The "SectionAndNoteListRenderer" is now cleaned from p. configurator specific code.

  The widget is also responsible for handling the configuration provided by the p. configurator form
  and applying it on the SO line with a 'field_changed' event that updates all the necessary fields.

- Added support for 'MULTI' and 'DELETE_ALL' operations on X2Many fields in basic_model.js
  - 'MULTI' allows to batch multiple operations at once
  - 'DELETE_ALL' behaves like 'DELETE' with all the current data of the field

- A message will be displayed when hovering a disabled attribute value's input to explain why it's
  disabled.
  e.g: Not available with Color: Black

  This works for both exclusions within the product and exclusions from a reference product.

- The exclusions will work in both sides, if "black" excludes "metal", "metal" will also exclude "black".

- The "Customizable Desk" and "Conference chair" products now have some stock in the initial inventory
  to avoid the stock warning when adding these products in a SO through the product configurator.

- The _name_search of product.template fallbacks by default on product.product
  In case there are no product.products yet (dynamic product variants configuration), we need to
  include the base product.template _name_search in the results

- The "ProductConfiguratorMixin" was named like that for historical reasons.
  It had no direct link to the product configurator anymore since the latter was moved in its own module.
  The ProductConfiguratorMixin was renamed to VariantMixin to avoid confusion.
  This commit just move files around, there should not be any functional change.

Spec
=======
- remove "configure a product" from sale order lines
  When the product configurator is active, replace the product_product_id by a product_template_id
  in the sale order line. When we select a template without variants, it sets the variant automatically,
  but when we select a product template having variants, it opens the configurator dialog.
- add a widget to modify the product configuration in the sale order line (next to product template field)
- UX improvements:
    - Invert image and configuration in the main screen
    - If the product doesn't have an image, hide it instead of showing the placeholder (only for first
      screen?)
- new independent option in sales settings to activate product configurator.
  (same in e-commerce)
- demo data: Change demo data to set Customizable Desk & Conference Chair as make to order
- If only one attribute value that is Custom, don't display radio, selection or even color box
- show exclusions in both sides in the configurator
  -> SOLUTION: auto populate other way around (Black not for XL -> XL not for Black)
- don't allow to select an excluded value in the configurator (frustrating).
  Replace with an uncomaptibility message on hover (e.g. Not available for Color: Black, Size: XL)
- apply the same mechanism for optional & suggested products: e.g. Not available for Customizable
  Table (Color: Black)
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes #28310

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
@robodoo
Copy link
Contributor

robodoo commented Mar 29, 2019

Merged, thanks!

@robodoo robodoo closed this Mar 29, 2019
@fw-bot fw-bot deleted the master-product-configurator-v13-awa branch October 20, 2019 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants